#ifndef RTW_HEADER_SeatMemoryModule_h_
#define RTW_HEADER_SeatMemoryModule_h_
#ifndef SeatMemoryModule_COMMON_INCLUDES_
# define SeatMemoryModule_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif

#include "SeatMemoryModule_types.h"

#include "multiword_types.h"

#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

#define SMMModelVersion                SMM1003

typedef struct {
  uint8_T DelayInput1_DSTATE;
  uint8_T DelayInput1_DSTATE_d;
  uint8_T UnitDelay_DSTATE;
  uint8_T DelayInput1_DSTATE_dv;
  uint8_T DelayInput1_DSTATE_c;
  uint8_T DelayInput1_DSTATE_h;
  uint8_T UnitDelay_DSTATE_j;
  uint8_T DelayInput1_DSTATE_l;
  boolean_T UnitDelay_DSTATE_n;
  boolean_T DelayInput1_DSTATE_g;
  boolean_T DelayInput1_DSTATE_i;
} DW_CoreSubsys_SeatMemoryModul_T;

typedef struct {
  uint8_T HeatCnt;
  boolean_T HeatFault;
  boolean_T HeatFault_e;
  boolean_T OutportBufferForHeatCmd;
  boolean_T HeatCmd;
  boolean_T HeatFault_j;
} B_CoreSubsys_SeatMemoryModu_c_T;

typedef struct {
  uint16_T temporalCounter_i1;
  uint16_T temporalCounter_i1_l;
  uint16_T TempCnt;
  uint16_T temporalCounter_i1_f;
  uint16_T temporalCounter_i1_fs;
  uint16_T temporalCounter_i1_n;
  boolean_T UnitDelay_DSTATE;
  uint8_T is_active_c6_SeatMemoryModule;
  uint8_T is_c6_SeatMemoryModule;
  uint8_T SeatHeatLvl_start;
  uint8_T is_active_c7_SeatMemoryModule;
  uint8_T is_c7_SeatMemoryModule;
  uint8_T SeatHeatLvl_start_g;
  uint8_T is_active_c8_SeatMemoryModule;
  uint8_T is_c8_SeatMemoryModule;
  uint8_T is_active_c14_SeatMemoryModule;
  uint8_T is_c14_SeatMemoryModule;
  uint8_T is_active_c15_SeatMemoryModule;
  uint8_T is_c15_SeatMemoryModule;
  uint8_T SeatHeatLvl_start_b;
  boolean_T Subsystem_MODE;
} DW_CoreSubsys_SeatMemoryMod_f_T;

typedef struct {
  B_CoreSubsys_SeatMemoryModu_c_T CoreSubsys;
} B_SeatHeatAct_SeatMemoryModul_T;

typedef struct {
  DW_CoreSubsys_SeatMemoryMod_f_T CoreSubsys;
} DW_SeatHeatAct_SeatMemoryModu_T;

typedef struct {
  uint16_T ResettableDelay_DSTATE[7];
  uint8_T DelayInput1_DSTATE;
  uint8_T icLoad;
} DW_CoreSubsys_SeatMemoryMo_fw_T;

typedef struct {
  uint8_T AutoPosSts;
} B_CoreSubsys_SeatMemoryMo_cau_T;

typedef struct {
  uint8_T is_active_c16_SeatMemoryModule;
  uint8_T is_c16_SeatMemoryModule;
  uint8_T CurrAccount_start;
} DW_CoreSubsys_SeatMemoryM_fwu_T;

typedef struct {
  uint16_T DelayInput1_DSTATE;
  uint8_T is_active_c17_SeatMemoryModule;
  uint8_T is_c17_SeatMemoryModule;
  boolean_T CurrAccount_start;
} DW_CoreSubsys_SeatMemory_fwu4_T;

typedef struct {
  uint8_T SeatWelcomeReq;
  uint8_T CurrAccount;
  uint8_T ImpAsg_InsertedFor_SeatHeatVent[2];
  uint8_T ImpAsg_InsertedFor_TgtTemp_at_i[2];
  uint8_T ImpAsg_InsertedFor_TgtRate_at_i[2];
  B_CoreSubsys_SeatMemoryMo_cau_T CoreSubsys_pn[7];
  B_SeatHeatAct_SeatMemoryModul_T SeatHeatAct[2];
} B_SeatMemoryModule_T;

typedef struct {
  uint16_T ResettableDelay_DSTATE[7];
  uint16_T StartPos;
  uint8_T UnitDelay1_DSTATE;
  uint8_T UnitDelay_DSTATE;
  uint8_T icLoad;
  uint8_T is_active_c18_SeatMemoryModule;
  uint8_T is_c18_SeatMemoryModule;
  uint8_T is_WelcomeMvBack;
  uint8_T is_WelcomeMvFrwd;
  uint8_T is_active_c13_SeatMemoryModule;
  uint8_T is_c13_SeatMemoryModule;
  uint8_T temporalCounter_i1;
  uint8_T is_active_c10_SeatMemoryModule;
  uint8_T is_c10_SeatMemoryModule;
  uint8_T temporalCounter_i1_a;
  uint8_T IGN_start;
  uint8_T is_active_c9_SeatMemoryModule;
  uint8_T is_c9_SeatMemoryModule;
  uint8_T temporalCounter_i1_o;
  uint8_T AccountApply_start;
  boolean_T DrvDoorSts_start;
  boolean_T SeatMemSw_start;
  boolean_T ReverseGearSts_start;
  DW_CoreSubsys_SeatMemory_fwu4_T CoreSubsys_pna[3];
  DW_CoreSubsys_SeatMemoryM_fwu_T CoreSubsys_pn[7];
  DW_CoreSubsys_SeatMemoryMo_fw_T CoreSubsys_p[3];
  DW_SeatHeatAct_SeatMemoryModu_T SeatHeatAct[2];
  DW_CoreSubsys_SeatMemoryModul_T CoreSubsys[2];
} DW_SeatMemoryModule_T;

struct tag_RTM_SeatMemoryModule_T {
  const char_T *errorStatus;
};

extern B_SeatMemoryModule_T SeatMemoryModule_B;
extern DW_SeatMemoryModule_T SeatMemoryModule_DW;
extern uint8_T gSMM_inU8IGNSts;
extern uint8_T gSMM_inU8MemAccount1;
extern uint8_T gSMM_inU8MemAccount2;
extern uint8_T gSMM_inU8MemAccount3;
extern uint16_T gSMM_inU16Account1HallFromEE[7];
extern uint16_T gSMM_inU16Account2HallFromEE[7];
extern uint16_T gSMM_inU16Account3HallFromEE[7];
extern uint16_T gSMM_inU16Account0HallFromEE[7];
extern uint16_T gSMM_inU16DrvSeatCusQhHall;
extern uint16_T gSMM_inU16DrvSeatCusSzHall;
extern uint16_T gSMM_inU16DrvSeatBckQhHall;
extern boolean_T gSMM_inBlSeatMemEnSw;
extern uint16_T gSMM_inU16DrvMirrorQj1Hall;
extern uint16_T gSMM_inU16DrvMirrorQj2Hall;
extern uint16_T gSMM_inU16PssMirrorQj1Hall;
extern uint16_T gSMM_inU16PssMirrorQj2Hall;
extern uint16_T gSMM_InU8DrvSeatCusQhValue;
extern uint16_T gSMM_InU8DrvSeatCusSzValue;
extern uint16_T gSMM_InU8DrvSeatBckQhValue;
extern uint16_T gSMM_InU8DrvSeatCusQhMax;
extern uint16_T gSMM_InU8DrvSeatCusSzMax;
extern uint16_T gSMM_InU8DrvSeatBckQhMax;
extern uint8_T gSMM_inU8AccountApply;
extern boolean_T gSMM_inBlDrvDoorSts;
extern boolean_T gSMM_inU16VehicleSpeedVld;
extern uint16_T gSMM_inU16VehicleSpeed;
extern boolean_T gSMM_inBlReverseGearSts;
extern boolean_T gSMM_inBlReverseGearValid;
extern boolean_T gSMM_inBlDrvSeatCusQhBlock;
extern boolean_T gSMM_inBlDrvSeatCusSzBlock;
extern boolean_T gSMM_inBlDrvSeatBckQhBlock;
extern boolean_T gSMM_inBlDrvMirrorQj1Block;
extern boolean_T gSMM_inBlDrvMirrorQj2Block;
extern boolean_T gSMM_inBlPssMirrorQj1Block;
extern boolean_T gSMM_inBlPssMirrorQj2Block;
extern uint8_T gSMM_inU8CrashIntensity;
extern boolean_T gSMM_inBlSeatWelcomeEn;
extern uint8_T gSMM_InU8EngineRunning;
extern uint8_T gSMM_InU8RemoteStart;
extern uint8_T gSMM_InU8Ms4DriverHeatVent;
extern uint8_T gSMM_InU8Ms4PassengerHeatVent;
extern uint16_T gSMM_InU16Seat1NtcAd;
extern uint16_T gSMM_InU16Seat2NtcAd;
extern uint8_T gSMM_InU8Seat1HeatFaultDtc;
extern uint8_T gSMM_InU8Seat2HeatFaultDtc;
extern uint8_T gSMM_InU8Seat1VentFaultDtc;
extern uint8_T gSMM_InU8Seat2VentFaultDtc;
extern uint8_T gSMM_InU8TboxDriverHeat;
extern uint8_T gSMM_InU8TboxPassengerHeat;
extern uint8_T gSMM_InU8TboxDriverVent;
extern uint8_T gSMM_InU8TboxPassengerVent;
extern boolean_T gSMM_InBlCcpDriverHeat;
extern boolean_T gSMM_InBlCcpPassengerHeat;
extern boolean_T gSMM_InBlCcpDriverVent;
extern boolean_T gSMM_InBlCcpPassengerVent;
extern boolean_T gSMM_inBlBrSw;
extern boolean_T gSMM_inBlBfSw;
extern boolean_T gSMM_inBlFdSw;
extern boolean_T gSMM_inBlRrwSw;
extern boolean_T gSMM_inBlFuSw;
extern boolean_T gSMM_inBlFrdSw;
extern uint8_T gSMM_inU8MirrSlctSw;
extern boolean_T gSMM_inBlMirrBfSw;
extern boolean_T gSMM_inBlMirrBrSw;
extern boolean_T gSMM_inBlMirrLfSw;
extern boolean_T gSMM_inBlMirrRtSw;
extern uint16_T gSMM_OutU16Account1HallToEE[7];
extern uint16_T gSMM_OutU16Account2HallToEE[7];
extern uint16_T gSMM_OutU16Account3HallToEE[7];
extern uint16_T gSMM_OutU16Account0HallToEE[7];
extern int16_T gSMM_OutS16Seat1NtcTmp;
extern int16_T gSMM_OutS16Seat2NtcTmp;
extern uint8_T gSMM_OutU8AccountApplySts;
extern uint8_T gSMM_OutU8DrvSeatCusQhValue;
extern uint8_T gSMM_OutU8DrvSeatCusSzValue;
extern uint8_T gSMM_OutU8DrvSeatBckQhValue;
extern uint8_T gSMM_OutU8DrvSeatCusQhCmd;
extern uint8_T gSMM_OutU8DrvSeatCusSzCmd;
extern uint8_T gSMM_OutU8PssMirrorQj2Cmd;
extern uint8_T gSMM_OutU8DrvSeatBckQhCmd;
extern uint8_T gSMM_OutU8DrvMirrorQj1Cmd;
extern uint8_T gSMM_OutU8DrvMirrorQj2Cmd;
extern uint8_T gSMM_OutU8PssMirrorQj1Cmd;
extern uint8_T gSMM_OutBlSeatMemSwReq;
extern uint8_T gSMM_OutU8Seat1HeatDuty;
extern uint8_T gSMM_OutU8Seat2HeatDuty;
extern uint8_T gSMM_OutU8Seat1HeatVentSts;
extern uint8_T gSMM_OutU8Seat2HeatVentSts;
extern uint8_T gSMM_OutU8Seat1VentDuty;
extern uint8_T gSMM_OutU8Seat2VentDuty;
extern boolean_T gSMM_OutU16Account1HallToEESw;
extern boolean_T gSMM_OutU16Account2HallToEESw;
extern boolean_T gSMM_OutU16Account3HallToEESw;
extern boolean_T gSMM_OutU16Account0HallToEESw;
extern boolean_T gSMM_OutBlSeat1HeatCmd;
extern boolean_T gSMM_OutBlSeat2HeatCmd;
extern int16_T gSMM_CfgTableNtcTmp[37];
extern uint16_T gSMM_CfgTableNtcAd[37];
extern uint16_T gSMM_CfgU16SeatWelcomeHallCnt;
extern uint8_T gSMM_CfgU8HeatHighTgtTemp;
extern uint8_T gSMM_CfgU8HeatLowTgtTemp;
extern uint8_T gSMM_CfgU8HeatMidTgtTemp;
extern uint8_T gSMM_CfgU8VentHighTgtDuty;
extern uint8_T gSMM_CfgU8VentLowTgtDuty;
extern uint8_T gSMM_CfgU8VentMidTgtDuty;
extern void SeatMemoryModule_initialize(void);
extern void SeatMemoryModule_terminate(void);
extern void SeatHeatVentCtrl_10ms(void);
extern void SeatMotionCtrl_10ms(void);
extern RT_MODEL_SeatMemoryModule_T *const SeatMemoryModule_M;

#endif

